import React from 'react'
import GoodsBagCss from './index.module.scss'

function GoodsBag(props){
    return(
        <div className={GoodsBagCss.main}>
            <img src={props.ItemImagUrl} alt=""/>
            <p className={GoodsBagCss.explain}>{props.ItemTitle}</p>
            <span>{"￥"+props.ItemPriceStr}</span>
            {
                props.ItemTag.length>0?(<p className={props.ItemTag.indexOf("买赠")!==1? GoodsBagCss.tag:GoodsBagCss.tag+" "+GoodsBagCss.tagT}>{props.ItemTag[props.ItemTag.length-1]}</p>):''
            }
            
            {
                props.VipLevelDiscount*100<100 || !props.VipLevelDiscount?(<p className={GoodsBagCss.discount}>{(props.VipLevelDiscount*10).toFixed(1)+"折"}</p>):''
            }
            
        </div>
    )
}
export default GoodsBag;

